<template>
  <div id="beijing">
    <div class="containerall">
      <div class="header">
        <div class="shopcar">购物车</div>
      </div>
      <div class="header1">
        <div class="checkbox">
          <input type="checkbox">
        </div>
        <div class="header1.2">全选</div>
        <div class="price">单价</div>
        <div class="numbera">数量</div>
        <div class="alls">小计</div>
      </div>
  <div>
    <div style="width: 1200px; height: 142px; border: 1px; " v-for="(shopca, index) in shoplist" :key="index">
        <div class="goodsc line" >
          <div class="checkbox1">
            <input type="checkbox" >
          </div>
          <div class="images"><img  :src="shopca.goodsImgSrc" height="80" width="80"/>
          </div>
          <div class="introduce">
            <div>{{shopca.goodsName}}</div>
            <div class="font2">{{shopca.goodsColor}}</div>
            <div class="font3">{{shopca.goodsSize}}</div>
          </div>
          <div class="price1">￥{{shopca.oldPrice}}</div>
          <div class="number1">
            <input type="number" class="kuang" >
          </div>
          <div class="all12">￥{{shopca.oldPrice}}</div>
        </div>
      </div>
  </div>
      <div class="checkout">
        <div class="checkout1"><a href="/">继续购物></a></div>
        <div class="checkout2">
          <div class="checkout_a">
            <div class="checkout_aa">商品总数</div>
            <div class="checkout_ab">0</div>
          </div>
          <div class="checkout_b">
            <div class="checkout_ba">总计:</div>
            <div class="checkout_bb">0</div>
          </div>
          <div class="checkout_c">
            <button class="button button1"><a href="/ShopCarList">立即下单</a></button>
          </div>
        </div>
      </div>

    </div>
  </div>
</template>

<script>
import axios from "axios";
export default {
  name: "SCNav",
  data:function (){

    return{
      shoplist:[],

    }
  },
  created() {
    this.loadShop()
  },
  methods:{
    loadShop(){
     //发送获取数据请求
      axios.get("http://192.168.0.239:8081/goods/allGoods").then((resp) => {
        if (resp.data.code === 200){
          this.shoplist=resp.data.goodsList;
          console.log(resp.data)
          console.log(this.shoplist)

        }
      })




    },

  },




}

</script>

<style scoped>

</style>
<style src="../../assets/CSS/shop.css"></style>